1eaa6d47bdb920f650a62ccfc1abd6eb78c00ed3,Ajax/Ajax/Sources/er/ajax/AjaxSubmitButton.java,AjaxSubmitButton,appendToResponse,#WOResponse#WOContext#,55
Before Change
response.appendContentString("<input ");
String name = nameInContext(context, component);
appendTagAttributeToResponse(response, "type", "button");
appendTagAttributeToResponse(response, "name", name);
appendTagAttributeToResponse(response, "value", valueForBinding("value", component ));
appendTagAttributeToResponse(response, "class", valueForBinding("class", component ));
appendTagAttributeToResponse(response, "style", valueForBinding("style", component ));
appendTagAttributeToResponse(response, "id", valueForBinding("id", component ));
if(disabledInComponent(component)) {
appendTagAttributeToResponse(response, "disabled", "disabled");
}
StringBuffer sb = new StringBuffer();
sb.append("new Ajax.Request(this.form.action,");
NSDictionary options = createAjaxOptions(component);
AjaxOptions.appendToBuffer(options, sb, context);
sb.append(")");
String onClick = (String)valueForBinding("onClick", component);
if(onClick != null) {
sb.append(";");
sb.append(onClick);
}
appendTagAttributeToResponse(response, "onClick", sb.toString());
response.appendContentString(" />");
super.appendToResponse(response, context);
}
After Change
else {
formReference = "document." + formName;
}
if (showButton) {
response.appendContentString("<input ");
appendTagAttributeToResponse(response, "type", "button");
String name = nameInContext(context, component);
appendTagAttributeToResponse(response, "name", name);
appendTagAttributeToResponse(response, "value", valueForBinding("value", component));
}
else {
response.appendContentString("<a href = \"javascript:void(0)\" ");
}
appendTagAttributeToResponse(response, "class", valueForBinding("class", component));
appendTagAttributeToResponse(response, "style", valueForBinding("style", component));
appendTagAttributeToResponse(response, "id", valueForBinding("id", component));
if (disabledInComponent(component)) {
appendTagAttributeToResponse(response, "disabled", "disabled");
}
StringBuffer sb = new StringBuffer();
sb.append("new Ajax.Request(" + formReference + ".action,");
NSDictionary options = createAjaxOptions(component, formReference);
AjaxOptions.appendToBuffer(options, sb, context);
sb.append(")");
String onClick = (String) valueForBinding("onClick", component);
if (onClick != null) {
sb.append(";");
sb.append(onClick);
}
appendTagAttributeToResponse(response, "onclick", sb.toString());
if (showButton) {
response.appendContentString(" />");
}
else {
response.appendContentString(">");